package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;
import legumes.shared.domain.Stall;

public class ParseStallMailCallback extends SequencableRPCCall<Stall> {

	private String mailContent;

	private Stall stall;

	public ParseStallMailCallback(String mailContent_) {
		mailContent = mailContent_;
	}

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES
				.parseStallMail(mailContent, this);
	}

	@Override
	public void onSuccess(Stall result_) {
		stall = result_;
		callNext();
	}

	public Stall getStall() {
		return stall;
	}

}